<?php
if (!defined('IN_ZWS')) exit();

class ArticleModel extends RelationModel {
	protected $_link = array('User' => array('mapping_type' => BELONGS_TO,
			'foreign_key' => 'uid',
			'mapping_fields' => 'id,username,email',
			),
		'GroupCategory' => array('mapping_type' => BELONGS_TO,
			'foreign_key' => 'id',
			'parent_key' => 'cid',
			'mapping_fields' => 'id,cname',
			'mapping_name' => 'cate',
			),
		'GroupGrade' => array('mapping_type' => BELONGS_TO,
			'foreign_key' => 'gdid',
			'parent_key' => 'gid',
			'mapping_fields' => 'id,cname',
			'mapping_name' => 'grade',
			),
		'GroupGroup' => array('mapping_type' => BELONGS_TO,
			'foreign_key' => 'id',
			'parent_key' => 'gpid',
			'mapping_fields' => 'id,cname',
			'mapping_name' => 'group',
			),
		'GroupSubject' => array('mapping_type' => BELONGS_TO,
			'foreign_key' => 'id',
			'parent_key' => 'sid',
			'mapping_fields' => 'id,cname',
			'mapping_name' => 'subject',
			),
		);
}
